/**
 * 
 */
package com.feonix.designPattern.prototype.sample1;

import com.feonix.designPattern.prototype.framework.Manager;
import com.feonix.designPattern.prototype.framework.Product;

/**
 * @CopyRight (c)1993-2017
 * @Project common_practice
 * @Comments 请输入该类的描述
 * @NameSpace com.feonix.designPattern.prototype.sample1
 * @Author Feonixzw
 * @CreateDate 2018年1月31日
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		// 准备
		Manager manager = new Manager();
		UnderlinePen upen = new UnderlinePen('~');
		MessageBox mbox = new MessageBox('*');
		MessageBox sbox = new MessageBox('/');
		manager.register("strong message", upen);
		manager.register("warning box", mbox);
		manager.register("slash box", sbox);

		// 生成
		Product p1 = manager.create("strong message");
		p1.use("Hello, world.");
		Product p2 = manager.create("warning box");
		p2.use("Hello, world.");
		Product p3 = manager.create("slash box");
		p3.use("Hello, world.");
	}

}
